import request from '@/utils/request'
export function company(id) {
  return request({
    url: '/company/' + id,
    method: 'GET'
  })
}
export function rolelist(params) {
  return request({
    url: '/sys/role',
    method: 'GET',
    params
  })
}
export function delrole(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'DELETE'
  })
}
export function addrole(data) {
  return request({
    url: '/sys/role',
    method: 'POST',
    data
  })
}
export function getrole(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'GET'
  })
}
export function editrole(id, data) {
  return request({
    url: '/sys/role/' + id,
    method: 'PUT',
    data
  })
}

export function getrolelist() {
  return request({
    url: '/sys/role',
    method: 'GET'
  })
}
export function upset(data) {
  return request({
    url: '/sys/role/assignPrem',
    method: 'PUT',
    data
  })
}
